package FSMDE.controllers.tests.mocks;

import main.java.FSMDE.controllers.listeners.IDiagramEventListener;
import main.java.FSMDE.models.Diagram;
import main.java.FSMDE.models.Interface;
import main.java.FSMDE.models.Transition;

public class MockDiagramListener implements IDiagramEventListener {

	private Diagram diagram;
	private Interface interface0;
	private Transition transition;
	private String diagramName;
	
	public Diagram getDiagram(){
		return this.diagram;
	}

	public String getDiagramName() {
		return diagramName;
	}

	public Interface getInterface(){
		return this.interface0;
	}

	public Transition getTransition() {
		return this.transition;
	}

	@Override
	public void handleInterfaceAdded(Diagram diagram, Interface interface0) {
		this.diagram = diagram;
		this.interface0 = interface0;
	}

	@Override
	public void handleInterfaceUpdated(Diagram diagram, Interface interface0) {
	}

	@Override
	public void handleTransitionAdded(Diagram diagram, Transition transition) {
		this.diagram = diagram;
		this.transition = transition;
	}

	@Override
	public void handleTransitionUpdated(Diagram diagram, Transition transition) {
	}

	@Override
	public void handleSubDiagramCreated(Diagram diagram, String diagramName) {
		this.diagram = diagram;
		this.diagramName = diagramName;
	}

}
